package com.atguigu.eduservice.client;

import com.atguigu.eduservice.client.impl.OrderFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author 76109
 */
@Component
@FeignClient(name = "service-order", fallback = OrderFileDegradeFeignClient.class)
public interface OrderClient {
    /**
     * 根据用户Id 和课程Id 查询订单状态
     *
     * @param memberId
     * @param courseId
     * @return
     */
    @GetMapping("/edu/order/order/isBuyCourse/{memberId}/{courseId}")
    boolean isBuyCourse(
            @PathVariable("memberId") String memberId
            ,
            @PathVariable("courseId") String courseId);
}
